/**
 * 
 */
package org.pump.client.codec;

import org.apache.mina.core.buffer.IoBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author liudong03
 *
 */
public class XidEvent extends EventData{
	private static final Logger mylog = LoggerFactory
			.getLogger(XidEvent.class);
	long xid;
	int length;
	
	public static XidEvent readBuffer(IoBuffer in,int len)
	{
		if(in.remaining() < len)
		{
			return null;
		}
		XidEvent xevent = new XidEvent();
		xevent.xid = in.getLong();
		xevent.length += 8;
		
		return xevent;
	}
	/**
	 * 
	 */
	public XidEvent() {
		// TODO Auto-generated constructor stub
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "XidEvent [xid=" + xid + ", length=" + length + "]";
	}
	
	
	
	

}
